﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConfigCreate
{
    /// <summary>
    /// 定义列表项
    /// </summary>
    public class ComboBoxItemNameAttribute : Attribute
    {
        /// <summary>
        /// 初始化定义列表项
        /// </summary>
        /// <param name="item_name">子项名</param>
        /// <exception cref="ConfigException"></exception>
        public ComboBoxItemNameAttribute(string item_name)
        {
            if (string.IsNullOrEmpty(item_name))
                throw new ConfigException("选择项内容不能为空");
            ItemName = item_name;
        }

        /// <summary>
        /// 子项名
        /// </summary>
        public string ItemName { get; private set; }
    }
}
